package com.cntcdt.api.service.impl;

import java.util.List;

import com.cntcdt.api.db.dao.UpdateGroupDeviceDao;
import com.cntcdt.api.db.model.UpdateGroupDeviceModel;
import com.cntcdt.api.service.UpdateGroupDeviceService;

public class UpdateGroupDeviceServiceImpl implements UpdateGroupDeviceService {

	@Override
	public List<UpdateGroupDeviceModel> findByGroupId(int groupId) {
		return UpdateGroupDeviceDao.getInstance().findByGroupId(groupId);
	}

	@Override
	public UpdateGroupDeviceModel findByGroupIdAndTerminal(int groupId,
			String terminal) {
		return UpdateGroupDeviceDao.getInstance().findByGroupIdAndTerminal(groupId, terminal);
	}

	@Override
	public int insertModel(UpdateGroupDeviceModel device) {
		return UpdateGroupDeviceDao.getInstance().insert(device);
	}

	@Override
	public UpdateGroupDeviceModel findById(int id) {
		return UpdateGroupDeviceDao.getInstance().findByPrimaryKey(id);
	}

	@Override
	public boolean updateModel(UpdateGroupDeviceModel device) {
		return UpdateGroupDeviceDao.getInstance().update(device);
	}

	@Override
	public UpdateGroupDeviceModel findByTerminal(String terminal) {
		// TODO Auto-generated method stub
		return UpdateGroupDeviceDao.getInstance().findByTerminal(terminal);
	}

	@Override
	public List<String> windows2android() {
		// TODO Auto-generated method stub
		return UpdateGroupDeviceDao.getInstance().windows2android();
	}

	@Override
	public boolean isExistRecord(String terminal) {
		// TODO Auto-generated method stub
		return UpdateGroupDeviceDao.getInstance().isExistRecord(terminal);
	}

}
